Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Signing Updates for Devs #2353

Closed

Conversation

proskd
Copy link
Contributor

@proskd proskd commented Oct 14, 2024

User description

What does this PR do

Makes it easier to build after a fresh clone or pull. CodeSigning should be all linked to the CodeSigning.xcconfig file now.

Where should the reviewer start

How should this be manually tested

pull a fresh clone of the repo and update the CodeSigning.xcconfig appropriately. Build and Run

Any background context you want to provide

What are the relevant tickets

Screenshots (important for UI changes)

Questions


PR Type

enhancement, configuration changes


Description

  • Updated all Xcode project files to replace hardcoded DEVELOPMENT_TEAM and PRODUCT_BUNDLE_IDENTIFIER with variables for easier configuration.
  • Added platformFilters for TopShelf.appex in the main project file.
  • Updated entitlements files to use variables for iCloud and app group identifiers.
  • Introduced variables in BuildFlags.xcconfig files to be overwritten by CodeSigning.xcconfig.
  • Linked baseConfigurationReference to Build-iOS.xcconfig in the main project file.

Changes walkthrough 📝

Relevant files
Configuration changes
15 files
project.pbxproj
Update code signing and configuration references                 

Provenance.xcodeproj/project.pbxproj

  • Added platformFilters for TopShelf.appex.
  • Replaced hardcoded DEVELOPMENT_TEAM with variable.
  • Updated PRODUCT_BUNDLE_IDENTIFIER to use variable.
  • Linked baseConfigurationReference to Build-iOS.xcconfig.
  • +40/-34 
    project.pbxproj
    Use variables for development team and bundle identifier 

    Cores/Mupen64Plus/PVMupen64Plus.xcodeproj/project.pbxproj

  • Replaced hardcoded DEVELOPMENT_TEAM with variable.
  • Updated PRODUCT_BUNDLE_IDENTIFIER to use variable.
  • +36/-36 
    project.pbxproj
    Update file types and use variables for identifiers           

    Cores/melonDS/PVMelonDS.xcodeproj/project.pbxproj

  • Changed file type for net_ifinfo and http_test.
  • Replaced hardcoded DEVELOPMENT_TEAM with variable.
  • Updated PRODUCT_BUNDLE_IDENTIFIER to use variable.
  • +6/-6     
    project.pbxproj
    Use variables for development team and bundle identifier 

    Cores/Gearcoleco/PVGearcoleco.xcodeproj/project.pbxproj

  • Replaced hardcoded DEVELOPMENT_TEAM with variable.
  • Updated PRODUCT_BUNDLE_IDENTIFIER to use variable.
  • +6/-6     
    project.pbxproj
    Use variables for development team and bundle identifier 

    Cores/pcsx_rearmed/PVPCSXRearmed.xcodeproj/project.pbxproj

  • Replaced hardcoded DEVELOPMENT_TEAM with variable.
  • Updated PRODUCT_BUNDLE_IDENTIFIER to use variable.
  • +6/-6     
    project.pbxproj
    Use variables for development team and bundle identifier 

    Cores/GameMusicEmu/PVGME.xcodeproj/project.pbxproj

  • Replaced hardcoded DEVELOPMENT_TEAM with variable.
  • Updated PRODUCT_BUNDLE_IDENTIFIER to use variable.
  • +6/-6     
    project.pbxproj
    Use variables for development team and bundle identifier 

    Cores/Desmume2015/PVDesmume2015.xcodeproj/project.pbxproj

  • Replaced hardcoded DEVELOPMENT_TEAM with variable.
  • Updated PRODUCT_BUNDLE_IDENTIFIER to use variable.
  • +6/-6     
    project.pbxproj
    Use variables for development team and bundle identifier 

    Cores/BeetlePSX/PVBeetlePSX.xcodeproj/project.pbxproj

  • Replaced hardcoded DEVELOPMENT_TEAM with variable.
  • Updated PRODUCT_BUNDLE_IDENTIFIER to use variable.
  • +4/-4     
    Provenance-AppStore.entitlements
    Use variables for iCloud and app group identifiers             

    Provenance/Provenance-AppStore.entitlements

    • Updated iCloud and app group identifiers to use variables.
    +3/-4     
    project.pbxproj
    Use variable for development team                                               

    CoresRetro/RetroArch/PVRetroArch.xcodeproj/project.pbxproj

    • Replaced hardcoded DEVELOPMENT_TEAM with variable.
    +2/-2     
    project.pbxproj
    Use variables for development team and bundle identifier 

    Cores/Dolphin/PVDolphin.xcodeproj/project.pbxproj

  • Replaced hardcoded DEVELOPMENT_TEAM with variable.
  • Updated PRODUCT_BUNDLE_IDENTIFIER to use variable.
  • +4/-4     
    project.pbxproj
    Use variables for development team and bundle identifier 

    Cores/Flycast/PVFlycast.xcodeproj/project.pbxproj

  • Replaced hardcoded DEVELOPMENT_TEAM with variable.
  • Updated PRODUCT_BUNDLE_IDENTIFIER to use variable.
  • +4/-4     
    project.pbxproj
    Use variables for development team and bundle identifier 

    Cores/emuThree/PVEmuThree.xcodeproj/project.pbxproj

  • Replaced hardcoded DEVELOPMENT_TEAM with variable.
  • Updated PRODUCT_BUNDLE_IDENTIFIER to use variable.
  • +4/-4     
    Provenance.entitlements
    Use variables for iCloud and app group identifiers             

    Provenance/Provenance.entitlements

    • Updated iCloud and app group identifiers to use variables.
    +2/-2     
    BuildFlags.xcconfig
    Add code signing variables for configuration                         

    Cores/BeetlePSX/BuildFlags.xcconfig

  • Added variables for code signing to be overwritten by
    CodeSigning.xcconfig.
  • +10/-0   

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    …config values - developers can now just use that file appropriately and things should build and run
    @qodo-merge-pro qodo-merge-pro bot added enhancement improvements, enhancements, new features, additions configuration changes labels Oct 14, 2024
    Copy link

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Configuration Change
    The DEVELOPMENT_TEAM and PRODUCT_BUNDLE_IDENTIFIER settings have been changed to use variables instead of hardcoded values. Verify that these variables are properly set in the CodeSigning.xcconfig file.

    Entitlements Update
    The iCloud container identifier and app group identifier have been changed to use variables. Ensure these variables are correctly defined and set in the appropriate configuration files.

    New Bundle Identifier
    A new bundle identifier variable SPOTLIGHT_IMPORT_PRODUCT_BUNDLE_IDENTIFIER has been added. Verify that this is used correctly in the relevant parts of the project.

    Copy link

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Maintainability
    Ensure consistent use of development team variable across all build configurations

    Consider using a consistent approach for referencing the development team across all
    build configurations. While most configurations now use "${DEVELOPMENT_TEAM}", some
    still use the hardcoded value. Update these remaining instances to use the variable
    for better maintainability.

    Provenance.xcodeproj/project.pbxproj [7854]

    -DEVELOPMENT_TEAM = S32Z3HMYVQ;
    +DEVELOPMENT_TEAM = "${DEVELOPMENT_TEAM}";
    • Apply this suggestion
    Suggestion importance[1-10]: 9

    Why: The suggestion addresses a critical maintainability issue by ensuring that all build configurations consistently use the development team variable. This change reduces the risk of errors and simplifies future updates.

    9
    Standardize variable substitution syntax across project files

    Consider using a consistent syntax for variable substitution across all project
    files. Currently, DEVELOPMENT_TEAM uses ${} while PRODUCT_BUNDLE_IDENTIFIER uses
    $(). Standardizing on one format (preferably $()) can improve readability and
    maintainability.

    Cores/Gearcoleco/PVGearcoleco.xcodeproj/project.pbxproj [1435-1448]

    -DEVELOPMENT_TEAM = "${DEVELOPMENT_TEAM}";
    +DEVELOPMENT_TEAM = "$(DEVELOPMENT_TEAM)";
     ...
     PRODUCT_BUNDLE_IDENTIFIER = "$(PRODUCT_BUNDLE_IDENTIFIER)";
    Suggestion importance[1-10]: 7

    Why: The suggestion to standardize variable substitution syntax improves readability and maintainability. The improved code correctly reflects the change, making this a useful enhancement.

    7
    Maintain consistent naming conventions for bundle identifiers

    Consider using a consistent naming convention for all product bundle identifiers by
    using the same variable prefix.

    Build.xcconfig [57]

    -SPOTLIGHT_IMPORT_PRODUCT_BUNDLE_IDENTIFIER = $(ORG_PREFIX).$(PROJECT_NAME:lower).SpotlightImportExtension
    +SPOTLIGHT_IMPORT_PRODUCT_BUNDLE_IDENTIFIER = $(ORG_PREFIX).$(PROJECT_NAME:lower).spotlightimport
    • Apply this suggestion
    Suggestion importance[1-10]: 6

    Why: The suggestion to use a consistent naming convention for bundle identifiers is reasonable. It enhances maintainability by ensuring uniformity across the codebase, though the impact is relatively minor as it is mainly a stylistic improvement.

    6
    Consistency
    Ensure consistent use of base configuration reference across all relevant build configurations

    The baseConfigurationReference is only added to some build configurations. For
    consistency and to ensure all configurations use the same base settings, consider
    adding this reference to all relevant build configurations.

    Provenance.xcodeproj/project.pbxproj [9045-9048]

     B355E01A2920AAA600E4C858 /* Debug */ = {
         isa = XCBuildConfiguration;
         baseConfigurationReference = B326758527B1E0BB0033C5D1 /* Build-iOS.xcconfig */;
         buildSettings = {
     
    +// ... (add to other configurations as well)
    +
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: This suggestion enhances consistency across build configurations by recommending the addition of a base configuration reference to all relevant configurations. This can prevent configuration drift and ensure uniformity in build settings.

    8
    Possible issue
    Verify the definition and consistency of the product bundle identifier variable

    The PRODUCT_BUNDLE_IDENTIFIER is being set to a variable
    $(SPOTLIGHT_IMPORT_PRODUCT_BUNDLE_IDENTIFIER) in some configurations. Ensure this
    variable is properly defined in your xcconfig files or build settings to avoid
    potential build issues.

    Provenance.xcodeproj/project.pbxproj [9084]

     PRODUCT_BUNDLE_IDENTIFIER = "$(SPOTLIGHT_IMPORT_PRODUCT_BUNDLE_IDENTIFIER)";
    +// Ensure SPOTLIGHT_IMPORT_PRODUCT_BUNDLE_IDENTIFIER is defined in your xcconfig files or build settings
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: The suggestion is important for preventing potential build issues by ensuring that the product bundle identifier variable is properly defined. However, it is more of a reminder than a direct code change, which slightly reduces its impact.

    7
    Ensure proper definition of development team and bundle identifier variables

    Ensure that the DEVELOPMENT_TEAM and PRODUCT_BUNDLE_IDENTIFIER variables are
    properly defined in your build settings or environment. This will prevent potential
    build errors if these variables are not set.

    Cores/melonDS/PVMelonDS.xcodeproj/project.pbxproj [5706-5721]

    -DEVELOPMENT_TEAM = "${DEVELOPMENT_TEAM}";
    +DEVELOPMENT_TEAM = "$(DEVELOPMENT_TEAM)";
     ...
     PRODUCT_BUNDLE_IDENTIFIER = "$(PRODUCT_BUNDLE_IDENTIFIER)";
    Suggestion importance[1-10]: 4

    Why: The suggestion to ensure proper definition of variables is a good reminder to prevent build errors. However, it is not actionable in terms of code changes, which limits its impact.

    4
    Best practice
    Use more specific variable names to prevent potential naming conflicts

    Consider using a more specific variable name for ORG_IDENTIFIER to avoid potential
    conflicts with other configuration files.

    Cores/BeetlePSX/BuildFlags.xcconfig [45]

    -ORG_IDENTIFIER = org.provenance-emu
    +PROVENANCE_ORG_IDENTIFIER = org.provenance-emu
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: The suggestion to use a more specific variable name for ORG_IDENTIFIER is valid as it can help prevent naming conflicts in larger projects. This improves maintainability and clarity, especially when multiple configuration files are involved.

    7
    Use build configuration or environment variables for development team and bundle identifier

    Consider using a build configuration file or environment variable to set the
    DEVELOPMENT_TEAM and PRODUCT_BUNDLE_IDENTIFIER values, rather than hardcoding them
    in the project file. This allows for easier management of these values across
    different development environments and team members.

    Cores/Mupen64Plus/PVMupen64Plus.xcodeproj/project.pbxproj [5119-5170]

    -DEVELOPMENT_TEAM = "${DEVELOPMENT_TEAM}";
    +DEVELOPMENT_TEAM = "$(DEVELOPMENT_TEAM)";
     ...
     PRODUCT_BUNDLE_IDENTIFIER = "$(PRODUCT_BUNDLE_IDENTIFIER)";
    Suggestion importance[1-10]: 5

    Why: The suggestion to use build configuration or environment variables is valid as it enhances flexibility and maintainability. However, the improved code does not reflect any change from the existing code, which reduces the impact of the suggestion.

    5
    Enhancement
    Align variable substitution syntax with other core projects for consistency

    To improve consistency across all core projects, consider updating the
    DEVELOPMENT_TEAM syntax to use $() instead of ${}. This will align it with the
    PRODUCT_BUNDLE_IDENTIFIER syntax and other core projects.

    Cores/GameMusicEmu/PVGME.xcodeproj/project.pbxproj [1343-1363]

    -DEVELOPMENT_TEAM = "${DEVELOPMENT_TEAM}";
    +DEVELOPMENT_TEAM = "$(DEVELOPMENT_TEAM)";
     ...
     PRODUCT_BUNDLE_IDENTIFIER = "$(PRODUCT_BUNDLE_IDENTIFIER)";
    Suggestion importance[1-10]: 7

    Why: Aligning the syntax for variable substitution across projects enhances consistency and maintainability. The improved code accurately reflects the suggested change, making it a beneficial enhancement.

    7

    💡 Need additional feedback ? start a PR chat

    @JoeMatt JoeMatt deleted the branch Provenance-Emu:develop-spm-2024 October 31, 2024 01:58
    @JoeMatt JoeMatt closed this Oct 31, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    configuration changes enhancement improvements, enhancements, new features, additions Review effort [1-5]: 2
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants